/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"DC88EAA6-B43A-4381-9147-525E5062EA04"}
 */
function onShow(firstShow, event) {
	databaseManager.setAutoSave(false)
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"A44D0854-E594-4AA5-83E9-CE6AD2196516"}
 */
function onActionSalir(event) {
	databaseManager.revertEditedRecords()
	var $win = application.getWindow("BIENES")
	$win.hide()
	$win.destroy()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"9AD32D0F-84F4-4CB0-8A0A-EE180222A302"}
 */
function onActionGrabar(event) {
	databaseManager.saveData()
	var $win = application.getWindow("BIENES")
	$win.hide()
	$win.destroy()
}
